import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        double length = scan.nextDouble();
        Square s = new Square(length);
        System.out.printf("%.2f ", s.getPerimeter());
        System.out.printf("%.2f\n", s.getArea());

        length = scan.nextDouble();
        double wide = scan.nextDouble();
        Rectangle r = new Rectangle(length, wide);
        System.out.printf("%.2f ", r.getPerimeter());
        System.out.printf("%.2f\n", r.getArea());

        double radius = scan.nextDouble();
        Circle c = new Circle(radius);
        System.out.printf("%.2f ", c.getPerimeter());
        System.out.printf("%.2f\n", c.getArea());

        scan.close();
    }
}

class Shape {
    double length;
    double width;
    double r;

    public Shape(double length) {
        this.length = length;
        this.width = length;
        this.r = length;
    }

    public Shape(double length, double width) {
        this.length = length;
        this.width = width;

    }

    public double getPerimeter() {
        return 2 * (this.length + this.width);
    }

    public double getArea() {
        return this.length * this.width;
    }
}

class Square extends Shape {

    public Square(double length) {
        super(length);
    }
}

class Rectangle extends Shape {

    public Rectangle(double length, double width) {
        super(length, width);
    }
}

class Circle extends Shape {

    public Circle(double r) {
        super(r);
    }

    //重写Overriding
    public double getArea() {
        return Math.PI * this.r * this.r;
    }

    public double getPerimeter() {
        return 2 * Math.PI * this.r;
    }

}